{{if !$hideTabs}}
<table cellSpacing=0  width=600 cellpadding="0">
	<tbody>
		<tr>
		      <td>{{include file="registration_admission/reg_tabs.tpl"}}</td>
		</tr>
	</tbody>
</table>
{{/if}}

{{if $id >= 0}}
<form method="post" action="{{$action}}" name="regform" ENCTYPE="multipart/form-data" onSubmit="return chkform(this)">
{{/if}}
<input type="hidden" name="pid" value="{{$pid}}"/>
<input type="hidden" name="lang" value="{{$lang}}"/>
<input type="hidden" name="id" value="{{$id}}"/>
<input type="hidden" name="ficha" value="soap"/>

<blockquote>
<h2>{{$title}}</h2>
<table cellSpacing=0  width=600 cellpadding="0">
	<tbody>
                    {{if $id >= 0}}
                        <tr valign="top">
                           <td>
                            <table cellSpacing=0  width=600 cellpadding="0">
                                {{$gui}}
                                <tr>
                                    <td>
                                            {{$LDArchivos}}
                                    </td>
                                    <td>
                                        {{$sListaArchtext}}{{$sFileBrowser}}
                                    </td>
                                </tr>
                                </table>
                            </td>
                            <td valign=top>{{$sRegOptions}}</td>
                        </tr>
                    {{else}}
                        <tr valign="top">
	                   <td widtg="100%">
                            <table cellspacing="1" cellpadding="2" border="0" align="center">
                                <tr class="reg_list_titlebar">
                                    <td align="center">{{$sFecha}}</td>
                                    <td align="center">{{$sAccion}}</td>
                                </tr>
                                {{if $camp == 0}}
                                    <tr class="wardlistrow1">
                                        <td colspan="2">{{$sNoDisponible}}</td>
                                    </tr>
                                {{else}}
                                    {{section loop=$gui name=g}}
                                        <tr class="wardlistrow1">
                                            <td align="center">{{$gui[g].fecha}}</td>
                                            <td align="center"><a href="{{$root_path}}/modules/historia_clinica/historia_clinica-soap.php{{$append}}&ficha=soap&pid={{$pid}}&id={{$gui[g].id}}&update=1"><input type="image" {{$img}} alt="Consultar"/></a></td>
                                        </tr>
                                    {{/section}}
                                {{/if}}
                            </table>
                          </td>
                          <td valign=top>{{$sRegOptions}}</td>
                        </tr>
                    {{/if}}
	</tbody>
</table>
</blockquote>

<p>
{{if $id >= 0}}
  {{if !$hideTabs}}

    {{$pbSubmit}}
    {{$pbReset}}
  {{/if}}
    </form>
{{else}}
    <a href="{{$root_path}}/modules/historia_clinica/historia_clinica-soap.php{{$append}}&ficha=soap&pid={{$pid}}&id=0"><img {{$img2}} alt="Agregar" align="absmiddle"></a>
{{/if}}
</p>